﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace ReportS
{
    /// <summary>
    /// ShGuZhang.xaml 的交互逻辑
    /// </summary>
    public partial class ShGuZhang : Window
    {
        public ShGuZhang()
        {
            InitializeComponent();

            InitVar();
            InitEvent();
        }

        private void InitVar()
        {
            uCSearchOrder1.Init(DoubleH.Utility.DataTableText.故障库);

            DataGridTextColumn gc3 = new DataGridTextColumn();
            gc3.Header = "故障描述";
            gc3.Binding = new Binding("[GuZhangMiaoShu]");
            dataGridExt1.Columns.Add(gc3);
            DataGridTextColumn gc4 = new DataGridTextColumn();
            gc4.Header = "解决方法";
            gc4.Binding = new Binding("[JieJueFangFa]");
            dataGridExt1.Columns.Add(gc4);
        }

      private void   InitEvent()
        {
            buttonOK.Click += (ss, ee) =>
            {

                dataGridExt1.ItemsSource = uCSearchOrder1.GetSearchData();
            };
        }
    }
}
